#ifndef WL_EXT_MEM_H
#define WL_EXT_MEM_H

/**
 * malloc memory
 * @param size memory size
 * @return pointer
 */
void* wl_ext_malloc(unsigned int size);

/**
 * realloc memory
 * @param ptr pointer
 * @param size memory size
 * @return pointer
 */
void* wl_ext_realloc(void* ptr, unsigned int size);

/**
 * free memory
 * @param ptr pointer
 */
void wl_ext_free(void* ptr);

/**
 * get memory size of free in system
 * @return memory size
 */
int wl_ext_mem_freesize(void);

/**
 * 提供第二版本的内存，是因为后续有平台可能会有两种内存管理方案。如果平台只有一种的话，可以不实现此接口
 */

/**
 * malloc memory, 2nd version
 * @param size memory size
 * @return pointer
 */
void* wl_ext_malloc_2(unsigned int size);

/**
 * realloc memory, 2nd version
 * @param ptr pointer
 * @param size memory size
 * @return pointer  
 */
void* wl_ext_realloc_2(void* ptr, unsigned int size);

/**
 * free memory, 2nd version 
 * @param ptr pointer
 */
void wl_ext_free_2(void* ptr);


/**
 * get memory size of free in system
 * @return memory size
 */
int wl_ext_mem_freesize_2(void);

#endif
